#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMessageBox>
#include "camera/QOpenCVWidget.h"
#include <opencv/cv.h>
#include <camera/camerawindow.h>
#include <opencv/highgui.h>
#include <stdio.h>
#include <assert.h>
#include <QSettings>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QWidget *currentMainWidget;
    int timerId;
    QSettings *settings;

public slots:
    void tomalaClicked();
    void shalalaClicked();
    void aboutClicked();
    
private:
    Ui::MainWindow *ui;
    QOpenCVWidget *cvwidget;
    CvCapture *camera;
    QHBoxLayout *xLayout;
    QVBoxLayout *yLayout;

protected:
    void timerEvent(QTimerEvent*);
    void removeCurrentWidget();

protected slots:
    void captureError( const QString& text );
    void showClientEdit(int clientId);

};

#endif // MAINWINDOW_H
